package com.yanqu.road.server.gameplayer.module.activity.goldautumn;

import com.yanqu.road.entity.activity.goldautumn.GoldAutumnBuff;
import com.yanqu.road.utils.property.Property;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class GoldAutumnJumpContext {

    //步数，产生的buff
    private Map<Integer, GoldAutumnBuff> buffMap = new HashMap<>();

    private Map<Integer, GoldAutumnBuff> getBuffMap() {
        return buffMap;
    }

    private List<Integer> beginStepList;

    private List<GoldAutumnJumpStep> allStepList = new ArrayList<>();

    private Property redReward = new Property();

    private boolean auto;

    public GoldAutumnJumpContext(List<Integer> beginStepList) {
        this.beginStepList = beginStepList;
    }

    public List<Integer> getBeginStepList() {
        return beginStepList;
    }

    public void setBeginStepList(List<Integer> beginStepList) {
        this.beginStepList = beginStepList;
    }

    public void setBuffMap(Map<Integer, GoldAutumnBuff> buffMap) {
        this.buffMap = buffMap;
    }

    public GoldAutumnBuff getGoldAutumnBuff(int id){
        for (Map.Entry<Integer, GoldAutumnBuff> entry : buffMap.entrySet()) {
            GoldAutumnBuff buff = entry.getValue();
            if(buff.getId() == id){
                return buff;
            }
        }
        return null;
    }

    public List<GoldAutumnJumpStep> getAllStepList() {
        return allStepList;
    }

    public void setAllStepList(List<GoldAutumnJumpStep> allStepList) {
        this.allStepList = allStepList;
    }

    public Property getRedReward() {
        return redReward;
    }

    public void setRedReward(Property redReward) {
        this.redReward = redReward;
    }

    public boolean isAuto() {
        return auto;
    }

    public void setAuto(boolean auto) {
        this.auto = auto;
    }
}
